﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo
{
	public static class EnumerableExtensions
	{
		public static bool IsNonNull<TElement>(TElement element)
			where TElement : class
		{
			return (element != null);
		}
		public static IEnumerable<TElement> NonNull<TElement>(this IEnumerable<TElement> enumerable)
			where TElement : class
		{
			return enumerable.Where(IsNonNull);
		}
	}
}
